/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
/**
 * \file
 * \brief Example types for a Dummy interface. ___Remember to rewrite this too!!___
 * \author Antti Maula <antti.maula@tkk.fi>
 *
 * $Id: DummyTypes.hpp,v 1.7 2009-05-13 07:18:16 amaula Exp $
 *
 */
#ifndef _MACI_DUMMYTYPES_HPP_
#define _MACI_DUMMYTYPES_HPP_
#include <inttypes.h>
#include "ownutils.h"
#include "owndebug.h"

namespace MaCI {

  /** MaCI - Dummy interface.
   *
   * This namespace contains all the methods and types related
   * to the Dummy interface.
   *
   * \note This interface is still under heavy developement. Please
   * consider this interface to be on Alpha stage of testing before
   * this note is removed!
   */
  namespace Dummy {
    
    /** Enumeration types for Dummy data elements.
     */
    enum EDummyType { 
      KTypeUnknown               = -1, ///< Unkown type.
      KTypeTimestamp             = 1,  ///< Common::TTimestamp element.
      KTypeCommand               = 2,  ///< TCommand element.
      KTypeDummyEvent            = 3,  ///< TDummyEvent element.
    };
    
    
    /** Enumerations for Dummy Command.
     */
    enum EDummyCommand { 
      /// Do very dummy things!
      KCommandDoDummyThings = 1,

      /// Do other dummy things. Not necessarily as dummy as the other
      /// command.
      KCommandDoOtherDummyThings  = 2,

      /// Command for explicitly requesting a random number.
      KCommandGetRandomNumber = 3
    };


    /** Dummy command.
     *
     * This structure contains command field to be used when sending
     * action requests to Dummy enabled clients.
     *
     * \see EDummyCommand
     */
    struct TCommand 
    {
      TCommand(const unsigned int aCmd = 0,
               const unsigned int aData = 0) 
	: cmd(aCmd),
          data(aData) {}
      uint32_t cmd;             ///< Command
      uint32_t data;            ///< Data for command. (Is command specific)
    };



    /** Dummy event predefined types.
     */
    enum EDummyEventType { 
      /** Unknown event type.
       *
       * This event type should never be sent
       * over to remote end.
       */
      KEventTypeUnknown          = 0,
      

      /** Dummy here.
       *
       * Dummy just wants to notify that is still around and kicking!
       */
      KEventTypeDummyHere        = 1,


      /** Random number.
       *
       * The event contains a random number you are free to use it as
       * you wish! :)
       */
      KEventTypeRandomNumber     = 2
    };


    /** Dummy event.
     *
     * This structure contains event data for a Dummy event.
     */
    struct TDummyEvent {
      TDummyEvent(const unsigned int aEventType = KEventTypeUnknown,
                  const unsigned int aData = 0)
        : type(aEventType),
          data(aData) {}
      
      uint32_t type;     ///< Event type. See type EDummyEventType.
      uint32_t data;     ///< Some data. May be a random number
    };
  }
}

#endif
